In a conventional art, when a process executes an input/output, a performance of a block input/output device is slow compared to a Central Processing unit (CPU) or a memory. Therefore, to decrease a bottleneck effect of the block input/output device, an input/output scheduler may allocate the CPU to another process, and execute the process having requested the input/output after a device driver completes a block calculation. In this instance, although a context switching function should be used to enhance the entire system performance, an overload on the CPU may occur when the context switching is performed.
With developments in a memory industry, an input/output speed of a memory-based block input/output device is very fast compared to a hard disk and may become much faster. Specifically, in a particular situation, to not perform the context switching may become a gain in aspects of an input/output response speed and a system performance.
Accordingly, there is a need for a method and apparatus for a context switching that may determine whether a context switching is to be performed to enhance a system performance, and thereby selectively perform the context switching as necessary.